package com.litidea.commons.utils;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import com.litidea.dataobjects.KValueDO;

public class CollectionUtils {
	
	public final static List<KValueDO> KV_VALUE_LIST = new ArrayList<KValueDO>(0);
	
	/**
	 * 获取列表第一个参数
	 * @param collection
	 */
	public static <T>T getFirstValue(List <T>list) {
		if(isEmpty(list)) return null;
		return list.get(0);
	}
	
	public static boolean isEmpty(Collection <? extends Object>collection) {
		return collection == null || collection.isEmpty();
	}

}
